# -*- coding: utf-8 -*-
# @Time    : 2022/1/24 18:59
# @Author  : Mr.Ye
# @Email   : a3289748713@163.com
# @File    : forms.py
# @Software: PyCharm

from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField, SubmitField, FileField, TextAreaField, SelectField, SelectMultipleField, \
    BooleanField
from wtforms.validators import DataRequired, ValidationError, EqualTo
from MyVideo.models import Admin

"""
Flask 表单验证，

"""

# 管理员登录
class LoginForm(FlaskForm):
    account = StringField(label='账号',
                          validators=[DataRequired(message='用户名不能为空!')],
                          description='账号',
                          render_kw={'class': 'form-control',
                                     "placeholder": '请输入你的用户名'},
                          )
    password = PasswordField(label='密码',
                             validators=[DataRequired(message='密码不能为空')],
                             description='密码',
                             render_kw={'class': 'form-control',
                                        'placeholder': '请输入密码'}

                             )
    remember_me = BooleanField('remember', default=False)
    submit = SubmitField(label='登录',
                         render_kw={'class': 'btn btn-primary btn-block btn-flat'}
                         )









